package com.mano.mall.api.seckill;

import com.alibaba.fastjson.JSONObject;
import com.mano.mall.common.base.BaseResponse;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 秒杀接口api
 */
public interface SecKillService {
    /**
     * 用户秒杀接口
     *
     * @phone 手机号码<br>
     * @seckillId 库存id
     * @return
     */
    @RequestMapping("/spike")
    public BaseResponse<JSONObject> secKill(String phone, Long seckillId);

    /**
     * 生成库存token
     * @param seckillId
     * @return
     */
    @RequestMapping("/addSeckillToken")
    public BaseResponse<JSONObject> addSeckillToken(Long seckillId);

}
